package com.example.emaildemo.controller;

import com.example.emaildemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user")
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/sendEmail")
    public String sendEmail(String email){
        userService.sendEmail(email);
        System.out.println(11111);
        return "success";
    }
}
